package leetcode.字符串;

/**
 * 实现 strStr()
 *
 * 寻找子串，使用 Java API 即可
 */
public class Test28实现strStr {
    public int strStr(String haystack, String needle) {
        if (needle == "" || needle == null || haystack == "" || haystack == null) {
            return 0;
        }
        int index = 0;
        index = haystack.indexOf(needle);
        return index;
    }
}
